<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/work_today.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script>
$(function(){
	$("#region").val("${centName}");
	$("#nickname").val("${nickName}");
});
var selectMsg = function(){
	var center = $("#region").val();
	var nickName = $("#nickname").val();
	window.location.href=encodeURI("${contextPath}/index/struct_addbook.htm?center="+center+"&nickName="+nickName);
}
</script>
</head>

<body>
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>组织架构</li>
			<li>&gt;</li>
			<li class="current">员工通讯录</li>
		</ul>
	</div>
	<div id="container">
		<div id="title">title</div>
		<table class="form_table">
			<tr>
				<td><label><b>查询条件：</b></label> <label for="region">中心地址：</label>
					<select id="region">
						<#if office_List??>
							<#list office_List as list>
								<option value="${list.name}">${list.name}</option>
							</#list>
						</#if>
					</select>
					<label for="nickname">姓名：</label> 
					<input type="text" id="nickname" size="15" value=""/> 
					<input type="button" value=" 查 询 " onclick="selectMsg()" />
					</td>
			</tr>
		</table>
		<table>
			<tr class="fields">
				<th>姓名</th>
				<th>办公地址</th>
				<th>职位</th>
				<th>电话</th>
				<th>邮箱</th>
				<th>现居地址</th>
			</tr>
			
			<#if list??>
				<#list list as list>
				<tr>
					<td align="center" class="stress">${list.nickname}</td>
					<td align="center">${list.regions}</td>
					<td align="center">${list.departments}（${list.job}）</td>
					<td align="center">${list.phone}</td>
					<td align="center">${list.email}</td>
					<td align="center">${list.address}</td>
				</tr>
				</#list>
			</#if>
			
		</table>
	</div>
	<div id="pager">
		<ul id="pagination">
			<#if page??>
		<#if page.pagetotal?? && page.pagetotal!="0">
	<#assign pagetotal = page.pagetotal>
	<#else>
	<#assign pagetotal = 1>
	</#if>
			<#if page.currpage??>
	<#assign currpage = page.currpage>
	<#else>
	<#assign currpage = 1>
	</#if>
				<#if currpage==1 >
					<li class="previous-off">上一页</li>
					<#else>
					<li class="previous"><a href="${contextPath}/index/struct_addbook.htm?currPage=${currpage-1}&center=${centName}&nickName=${nickName}">上一页</a></li>
					</#if>
					
		<#if pagetotal<=11>
			<#list 1..pagetotal as index_up>  
	           <#if currpage==index_up > 
	           		<li class="current">${index_up}</li>
	           <#else>
	           		<li><a href="${contextPath}/index/struct_addbook.htm?currPage=${index_up}&center=${centName}&nickName=${nickName}">${index_up}</a></li>  
	           </#if>  
			</#list>  
		<#else>
			<#if currpage<=8 >
				<#list 1..9 as index_up>  
	           	<#if currpage==index_up >  
	            	<li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/struct_addbook.htm?currPage=${index_up}&center=${centName}&nickName=${nickName}">${index_up}</a></li> 
	           	</#if>
	           	</#list>  
	           	<li>...</li>
	           	<li><a href="${contextPath}/index/struct_addbook.htm?currPage=${pagetotal}&center=${centName}&nickName=${nickName}">${pagetotal}</a></li>  
				
			<#elseif (currpage>= 9 && currpage<pagetotal-7)  >	
				<li><a href="${contextPath}/index/struct_addbook.htm?currPage=1&center=${centName}&nickName=${nickName}">1</a></li>  
				<li>...</li>
				<#list currpage-3..currpage+3 as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/struct_addbook.htm?currPage=${index_up}&center=${centName}&nickName=${nickName}">${index_up}</a></li>  
	           	</#if>
	           	</#list>
				<li>...</li>
	           	<li><a href="${contextPath}/index/struct_addbook.htm?currPage=${pagetotal}&center=${centName}&nickName=${nickName}">${pagetotal}</a></li>   
			<#else>
				<li><a href="${contextPath}/index/struct_addbook.htm?currPage=1&center=${centName}&nickName=${nickName}">1</a></li> 
				<li>...</li>
				<#list pagetotal-8..pagetotal as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/struct_addbook.htm?currPage=${index_up}&center=${centName}&nickName=${nickName}">${index_up}</a></li> 
	           	</#if>
				</#list>  
			</#if>
			
		</#if> 
		<#if currpage==pagetotal >
		 	<li class="previous-off">下一页</li>
		<#else>
			<li class="previous"><a href="${contextPath}/index/struct_addbook.htm?currPage=${currpage+1}&center=${centName}&nickName=${nickName}">下一页</a></li>
		</#if>
		<li class="pageinfo">共${num}条记录</li>
	</#if>
		</ul>
	</div>
	<div class="emptyline"></div>
</body>
</html>